package com.usefullc.crawler.param;
import com.usefullc.common.domain.BaseDomain;
import com.usefullc.common.enums.ValidTypeEnum;
import com.usefullc.system.validator.UsefulPropertyVerify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 爬虫模板参数实体
 * @author: 星空
 * @date: 2022-07-26
 */
@ApiModel
@Data
public class TemplateParam extends BaseDomain {

//useful_auto_generate_section_start

    @UsefulPropertyVerify(minLen=1, required=true, maxLen=100)
    @ApiModelProperty(notes = "模板名称")
    private String name;

    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "ID")
    private Long id;

    @UsefulPropertyVerify(required=true)
    @ApiModelProperty(notes = "开启图片")
    private Integer enableImage;

    @UsefulPropertyVerify(required=true)
    @ApiModelProperty(notes = "开启脚本")
    private Integer enableJavascript;

    @UsefulPropertyVerify(required=true)
    @ApiModelProperty(notes = "开启代理")
    private Integer enableProxy;

    @UsefulPropertyVerify(required=true)
    @ApiModelProperty(notes = "切换代理")
    private Integer banSwitchProxy;

    @UsefulPropertyVerify(minLen=2, required=true, maxLen=50)
    @ApiModelProperty(notes = "处理方式")
    private String handlerType;

    @UsefulPropertyVerify(required=true)
    @ApiModelProperty(notes = "开启样式")
    private Integer enableStyle;

    @UsefulPropertyVerify(minLen=1, required=true, maxLen=20)
    @ApiModelProperty(notes = "随机毫秒")
    private String runRdMs;

    @UsefulPropertyVerify(min=-2147483648, max=2147483647, required=true)
    @ApiModelProperty(notes = "抽样类型")
    private Integer sampleType;

    @UsefulPropertyVerify(min=1, required=true)
    @ApiModelProperty(notes = "抽样数值")
    private Integer sampleValue;

    @UsefulPropertyVerify(required=true)
    @ApiModelProperty(notes = "保存源码")
    private Integer storePageSource;

    @UsefulPropertyVerify(minLen=1, maxLen=500)
    @ApiModelProperty(notes = "描述")
    private String description;

    @ApiModelProperty(notes = "变量")
    private String variables;

//useful_auto_generate_section_end

    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "变量配置")
    private String variablesConfig;


    @ApiModelProperty(notes = "复制模版ID")
    private Long copyTemplateId;

    @ApiModelProperty(notes = "最后运行状态（0 初始化；1 运行中；2 暂停; 3 完成 ）")
    private Integer status;

    @ApiModelProperty(notes = "模板类型（0 公共，1 私有）")
    private Integer type;

}
